package com.springmongodb.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(collection = "book")
public class Book {
  @Id
  private Integer id;
  @Field("name")
  private String name;
  private double price;
  private String category;
  private Integer pnum;
  private String imgurl;
  private String description;
  private String author;
  private Integer sales;
  

}
